package com.huishu.goods.controller;


import com.huishu.commons.pojo.Result;
import com.huishu.goods.pojo.model.NewproductBestsellingDO;
import com.huishu.goods.service.NewproductBestsellingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author generator@ljj
 * @since 2023-06-20
 */
@RestController
@RequestMapping("/newproduct-bestselling")
@Slf4j
public class NewproductBestsellingController {

    @Autowired
    private NewproductBestsellingService newproductBestsellingService;


    @PostMapping("/update")
    public Result update(@RequestBody NewproductBestsellingDO newproductBestsellingDO) {
        return newproductBestsellingService.updateById(newproductBestsellingDO) ? Result.success() : Result.fail();
    }
}
